package com.jeesite.modules.dataScreen.web;

import com.alibaba.fastjson2.JSONObject;
import com.jeesite.modules.dataScreen.entity.Tianbao;
import com.jeesite.modules.dataScreen.service.SupervisorService;
import com.jeesite.modules.dataScreen.web.vo.IndustryIndexVo;
import com.jeesite.modules.dataScreen.web.vo.Result;
import com.jeesite.modules.dataScreen.web.vo.supervisor.UnReportItemVo;
import com.jeesite.modules.dataScreen.web.vo.supervisor.UnReportVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
@Api(tags = "首页-监督评价")
@RequestMapping("/supervisor")
public class SupervisorController {

    @Resource
    private SupervisorService supervisorService;

    @ApiOperation("数据质量排名")
    @GetMapping("/unReport")
    public Result<List<UnReportVo>> unReportVo() {
        return Result.OK(supervisorService.unReportVo());
    }

    @ApiOperation("数据质量排名详情")
    @GetMapping("/unReportList")
    @ApiImplicitParam(name = "tbdwName",value = "填报单位",required = true)
    public Result<List<UnReportItemVo>> unReportList(@RequestParam String tbdwName) {
        return Result.OK(supervisorService.unReportList(tbdwName));
    }

    @ApiOperation("信用")
    @GetMapping("/credit")
    public Result<List<JSONObject>> credit() {
        return Result.OK(supervisorService.credit());
    }

    @ApiOperation("行政审批")
    @GetMapping("/administrative")
    public Result<List<IndustryIndexVo>> administrative() {
        return Result.OK(supervisorService.administrative());
    }

}
